<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="com.yanjin.dao.*"%>
 <%@ page import="com.jdbc.tool.*"%> 
 <%@ page import="java.sql.*" %>
    <% 
request.setCharacterEncoding("utf-8");
String id=request.getParameter("id");
String mobil=request.getParameter("mobil");

String sql="select * from emai_user";
if(id!=null&&!"".equals(id.trim())){
	  sql=sql+" where e_user_id like '%"+id+"%'";
  }
  if(mobil!=null&&!"".equals(mobil.trim())){
	  if(sql.indexOf("where")==-1){
		  sql=sql+"where e_mobile like '%"+mobil+"%'";
	  }else{
		  sql=sql+"and e_mobile like '%"+mobil+"%'";
	  }
  }
Connection conn = DBLianjie.getconn();
Statement stm = conn.createStatement();
ResultSet rs = stm.executeQuery(sql);
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>My JSP 'LikeSelect.jsp' starting page</title>

	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<style>
    body{
    padding:20px; 
    overflow:hidden;
    background-color: #d1e3ed;
    }
    .ti{
    background-image: url(lantian.jpg);
    width:1024px;
    height:668px;
    }
    .list{
      width:100%;
      border-top:2px solid #dfc9b2;
      border-bottom:2px solid #dfc9b2;
    }
    .list th{
    width:100px;
    background:#f7f4eb;
    color:#8a7152;
    }
</style>
  </head>
  
  <body>

	<div class="ti">
     <div class="list">
	<table>
	<tr>
      <th>用户ID</th>
      <th>用户姓名</th>
      <th>用户密码</th>
      <th>性别</th>
      <th>出生日期</th>
      <th>身份证ID</th>
      <th>邮箱</th>
      <th>电话</th>
      <th>地址</th>
      <th>级别</th>
      <th>备注</th>
      </tr>
      <%while(rs.next()){%>
				<tr>
					<td ><%=rs.getString("e_user_id")%></td>
					<td ><%=rs.getString("e_user_name")%></td>
					<td><%=rs.getString("E_PASSWORD")%></td>
					<td><%=rs.getString("e_sex")%></td>
					<td><%=rs.getDate("e_brithday")%></td>
					<td><%=rs.getString("E_IDENTITY_CODE")%></td>
					<td><%=rs.getString("e_emial")%></td>
					<td ><%=rs.getString("e_mobile")%></td>
					<td><%=rs.getString("E_ADDRESS")%></td>
					<td><%=rs.getString("E_STATUS")%></td>
					<td><%=rs.getString("E_LJ")%></td>
				</tr>
	  <% }%>
			</table>
			</div>
			</div>
  </body>
</html>
